Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 8, 2026

Addresses code review feedback on PR #20 to eliminate redundant validations and tighten interface matching logic.

Changes

  • Interface matching precision: Changed "title" in interface.lower() to interface_lower == "title" to prevent false matches on "subtitle", "entitle", etc.

  • Excerpt validation loop: Break after first successful reference field match to avoid N validations when multiple reference fields contain values

  • Title validation loop: Validate only first available title against first available reference instead of all combinations (prevents N×M duplications)

  • Class documentation: Updated ReferenceValidationPlugin docstring to reflect title validation capabilities and dcterms:title field discovery

  • Test coverage: Added test_validate_title_only_fetch_fails() for when fetcher.fetch() returns None

Example

Before: Instance with 2 title fields and 2 reference fields → 4 validation calls
After: Instance with 2 title fields and 2 reference fields → 1 validation call (first title × first reference)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Base automatically changed from feature/title-validation to main January 8, 2026 02:17
Copilot AI changed the title [WIP] Add title validation with dcterms:title support Fix duplicate validations and overly broad interface matching in title validation Jan 8, 2026
Copilot AI requested a review from cmungall January 8, 2026 02:17
@dragon-ai-agent dragon-ai-agent marked this pull request as ready for review January 8, 2026 07:20
@dragon-ai-agent dragon-ai-agent merged commit 2ad1bef into main Jan 8, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants